package com.gsy.iit;

import java.io.Serializable;
import java.util.ArrayList;

public class Course implements Serializable {
    private String courseCode;
    private String courseName;
    private String courseDescription;
    /**
     * 表示该课程的前置课程要求
     * 这个是一个二重数组，行之间是或的关系，行内为与的关系
     */
    private ArrayList<ArrayList<String>> coursePrerequisite;

    @Override
    public String toString() {
        return "Course{" +
                "courseCode='" + courseCode + '\'' +
                ", courseName='" + courseName + '\'' +
                ", courseDescription='" + courseDescription + '\'' +
                ", coursePrerequisite=" + coursePrerequisite +
                '}';
    }

    public String toCsvString(){
        return String.format("\"%s\",\"%s\",\"%s\"\n",courseCode,courseName,courseDescription);
    }
    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseDescription() {
        return courseDescription;
    }

    public void setCourseDescription(String courseDescription) {
        this.courseDescription = courseDescription;
    }

    public ArrayList<ArrayList<String>> getCoursePrerequisite() {
        return coursePrerequisite;
    }

    public void setCoursePrerequisite(ArrayList<ArrayList<String>> coursePrerequisite) {
        this.coursePrerequisite = coursePrerequisite;
    }
}
